export class inputConstant {

    private userInputConstant = [{
        name: '',
        input: '',
        date: '',
    }];

    public add(name: any, input: any, date: any) {
        this.userInputConstant.push({date: date, input: input, name: name});
    }

    public getConstant(){
        return this.userInputConstant;
    }

    public removeConstant(name: any){
        this.userInputConstant.forEach(item => {
            if(item.name === name){
                this.userInputConstant.splice(name,1);
            }
        })
    }

    public getInput(name: any){

        let input  = null
        this.userInputConstant.forEach(item => {
            if(item.name === name){
                input = item.input;
            }
        })
        return input

    }

    public getDate(name: any){
        let input  = null
        this.userInputConstant.forEach(item => {
            if(item.name === name){
                input = item.date;
            }
        })
        return input
    }
}












